﻿using System;
using System.ComponentModel.DataAnnotations;

namespace IssueVision.Data.Web
{
    // The MetadataTypeAttribute identifies AttributeMetadata as the class
    // that carries additional metadata for the Attribute class.
    [MetadataTypeAttribute(typeof(Attribute.AttributeMetadata))]
    public partial class Attribute
    {
        // This class allows you to attach custom attributes to properties
        // of the Attribute class.
        //
        // For example, the following marks the Xyz property as a
        // required property and specifies the format for valid values:
        //    [Required]
        //    [RegularExpression("[A-Z][A-Za-z0-9]*")]
        //    [StringLength(32)]
        //    public string Xyz { get; set; }
        internal sealed class AttributeMetadata
        {

            // Metadata classes are not meant to be instantiated.
            private AttributeMetadata()
            {
            }

            public string AttributeName { get; set; }

            public Guid ID { get; set; }

            public long IssueID { get; set; }

            public string Value { get; set; }
        }
    }
}
